<template>
  <el-form class="login-container" label-position="left"
           label-width="0px" >
    <h3 class="login_title">注册(仅供演示)</h3>
    <el-form-item prop="account">
      <el-input type="text"  autocomplete="off" placeholder="账号"></el-input>
    </el-form-item>
    <el-form-item prop="nickname">
      <el-input type="text"  autocomplete="off" placeholder="昵称"></el-input>
    </el-form-item>
    <el-form-item prop="pass">
      <el-input type="password"  autocomplete="off" placeholder="密码"></el-input>
    </el-form-item>
    <el-form-item prop="checkPass">
      <el-input type="password"  autocomplete="off" placeholder="验证密码"></el-input>
    </el-form-item>
    <el-form-item prop="validate">
      <el-input type="text"  autocomplete="off" placeholder="邮箱"></el-input>
    </el-form-item>

    <el-form-item>
      <el-button type="primary" @click="submitForm('ruleForm')">提交</el-button>
      <el-button @click="resetForm()">重置</el-button>
    </el-form-item>

  </el-form>
</template>

<script>
    import {postRequest} from "../utils/api";

    export default {
      name: "Register",
      data(){
        return{
          registerForm: {
            username: '',
            password: '',
            checkPass: '',
            nickname: '',
          }
        }
      },
      methods:{
        submitForm(){
          var _this = this;
          this.loading = true;
          postRequest('/reg', {
            username: this.loginForm.username,
            password: this.loginForm.password
          })
        },
        resetForm() {

        }
      }
    }
</script>

<style scoped>
  .login-container {
    border-radius: 15px;
    background-clip: padding-box;
    margin: 180px auto;
    width: 350px;
    padding: 35px 35px 15px 35px;
    background: #fff;
    border: 1px solid #eaeaea;
    box-shadow: 0 0 25px #cac6c6;
  }

  .login_title {
    margin: 0px auto 40px auto;
    text-align: center;
    color: #505458;
  }

</style>
